home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / ast_text / faqs / idl-faq < prev    next >
Text File  |  1993-06-28  |  31KB  |  769 lines

  1. Path: senator-bedfellow.mit.edu!enterpoop.mit.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!uwm.edu!msuinfo!uchinews!cs.umd.edu!skates.gsfc.nasa.gov!jaameri!pat
  2. From: pat@jaameri.gsfc.nasa.gov (patrick m. ryan)
  3. Newsgroups: comp.lang.idl-pvwave,comp.answers,news.answers
  4. Subject: IDL (Interactive Data Language) FAQ
  5. Supersedes: <1t83je$ped@skates.gsfc.nasa.gov>
  6. Followup-To: comp.lang.idl-pvwave
  7. Date: 17 Jun 1993 19:37:35 GMT
  8. Organization: Oceans & Ice Branch, Code 971, NASA/GSFC/Hughes STX
  9. Lines: 747
  10. Approved: news-answers-request@MIT.Edu
  11. Expires: Thu, 15 July 1993 00:00:00 GMT
  12. Message-ID: <1vqh5v$6i1@skates.gsfc.nasa.gov>
  13. Reply-To: idl-faq@jaameri.gsfc.nasa.gov
  14. NNTP-Posting-Host: jaameri.gsfc.nasa.gov
  15. Mime-Version: 1.0
  16. Content-Type: text/plain; charset=US-ASCII
  17. Content-Transfer-Encoding: 7bit
  18. Summary: Frequently-asked questions about the Interactive Data Language (IDL).
  19. X-Newsreader: TIN [version 1.2 PL0]
  20. Xref: senator-bedfellow.mit.edu comp.lang.idl-pvwave:1214 comp.answers:1046 news.answers:9525
  21.  
  22.  
  23. Archive-name: idl-faq
  24. Last-modified: 1993/06/17
  25. Version: $Id: idl-faq,v 1.5 1993/06/17 19:34:13 pat Exp pat $
  26.  
  27.  
  28. This is a list of Frequently Asked Questions about the Interactive Data
  29. Language or IDL.  These questions pop up fairly regularly in the newsgroup
  30. comp.lang.idl-pvwave.  This list is an attempt to cut down on net.traffic
  31. regarding commonly asked questions.  Users are encouraged to read through
  32. this list before posting a query to the newsgroup.
  33.  
  34. [SPECIAL NOTE: As of this writing, the editor has not gotten his hands on
  35.  IDL 3.1.  Bug reports and questions about IDL 3.1 are especially welcome
  36.  at this time. ]
  37.  
  38.   A Note from the editor about PV~WAVE:
  39.  
  40.   I do not have any direct experience with PV~WAVE.  As such, I will try to
  41.   minimize comments which appear to favor one package or the other.  I
  42.   will, however, welcome concise descriptions of technical and functional
  43.   differences between the two packages.
  44.  
  45. If you are viewing this text in a GNU Emacs Buffer, you can type
  46. "M-2 C-x $" to get an overview of just the questions.  Then, when you want
  47. to look at the text of the answers, just type "C-x $".
  48.  
  49.  
  50.   The following questions are answered:
  51.  
  52.   G01.    What is IDL?
  53.   G02.    Where can I contact them?
  54.   G03.    How do I get IDL?
  55.   G04.    What is the current version of IDL?
  56.   G05.    On what systems does IDL run?
  57.   G06.    What is PV~WAVE and how is it related to IDL?
  58.   G07.    Are there anonymous FTP sites for IDL?
  59.   G08.    How can I get help?
  60.   G09.    Why are there two newsgroups for IDL?
  61.   G10.    Does anyone at RSI read this group?  Is anyone there listening?
  62.   G11.    When is the next version of IDL due out?
  63.   T01.    Why doesn't polycontour fill open contours?
  64.   T02.    How do I increase the number of commands stored in the
  65.   T03.    How do I get IDL to call routines in language X, running
  66.   T04.    Why does XPALETTE edit my color table incorrectly?
  67.   T05.    Is there on-line help for IDL?
  68.   T06.    I run IDL under X in SunOS 4.x, and after I logout, the screen
  69.   T07.    Sometimes my variables seem to disappear.  Why is this?
  70.   T08.    Is there a major mode for editing IDL code in Emacs?
  71.   T09.    How do I get 3-D widgets under OpenLook 3.0?
  72.   T10.    Why does one of the widgets appear red under OpenWindows?
  73.   T11.    Where are all the IDL routines and userlib procedures?
  74.   T12.    Does anybody know how to put multiple image plots on one page in
  75.   T13.    Does case matter in IDL?
  76.   T14.    How do I set up IDL to get precise control over plot window
  77.     and text positioning with either portrait or landscape page
  78.     orientation on a PostScript or HP-GL printer?
  79.   T15.    I get the error message "Code Area Full".  What do I do?
  80.  
  81.  
  82. ============================================================
  83. GENERAL:
  84.  
  85.  
  86. G01.    What is IDL?
  87.   
  88.     IDL is the Interactive Data Language.  It is is a product of
  89.   Research Systems, Inc. (RSI).
  90.   
  91.   The following is quoted from the README file at rsinc.com:/pub/idl/README.
  92.   As such, it describes IDL's capabilities in an understandably subjective
  93.   manner.  ;-)
  94.   
  95.   {begin quote}
  96.       IDL, Interactive Data analysis Language, is a
  97.   complete package for the interactive reduction, analysis,
  98.   and visualization of scientific data and images.  Optimized
  99.   for the workstation environment, IDL integrates a responsive
  100.   array oriented language with numerous data analysis methods
  101.   and an extensive variety of two and three dimensional
  102.   displays into a powerful tool for researchers.
  103.   
  104.     IDL supports an extensive data import capability,
  105.   publication quality hard copy output, and user-defined Motif
  106.   graphical user interfaces.
  107.   
  108.     Users can create complex visualizations in hours
  109.   instead of weeks with the aid of IDL's high level capabilities
  110.   and interactive environment.
  111.   
  112.     IDL is useful in physics, astronomy, image and
  113.   signal processing, mapping, medical imaging, statistics,
  114.   and other technical disciplines requiring visualization of
  115.   large amounts of data.
  116.   {end quote}
  117.   
  118.   Here is a short history of RSI:
  119.       [attributed to ali@rsinc.com (Ali Bahrami)]
  120.   
  121.   {begin quote}
  122.     IDL is a product of Research Systems, Inc., founded in 1977
  123.     by David Stern. The origins of IDL were developed at the Laboratory
  124.     for Atmospheric and Space Physics (LASP) at the University
  125.     of Colorado. David was one of the people involved in efforts to
  126.     make computers easier to use for the physicists at the Lab.
  127.     The first program in the evolutionary chain to IDL was named Rufus
  128.     (named after Dave's dog). Rufus was a very simple vector oriented
  129.     calculator that ran on the PDP-12. It accepted 2 letter codes that
  130.     specified (1) An arithmetic operation (2) The input registers to
  131.     serve as operands, and (3) the destination register. The next version
  132.     was the Mars Mariner Spectrum Editor (MMED) which was a version
  133.     of Rufus that ran on the PDP-8.
  134.  
  135.     The next program in this line was named SOL, and it also ran on
  136.     the PDP-8. Unlike its predecessors, SOL was a real computer language
  137.     with a real syntax (no more 2 letter codes). It was an APL influenced
  138.     array oriented language with some primitive graphics capabilities.
  139.     The resemblance to IDL was there, but very faintly.
  140.  
  141.     In 1977, Dave left LASP to start Research Systems Inc. (RSI) with the
  142.     intention of building on the ideas contained in SOL. The initial
  143.     result of this endeavor was PDP-11 IDL, which was much more capable than
  144.     SOL. Graphics was usually done on Tektronix terminals and outboard
  145.     raster graphics displays. I used this version at LASP in 1981 on a
  146.     PDP11/34 under RSX-11M in 1981 (I worked as a student at LASP from
  147.     1981 to 1987). I didn't use it for very long though,
  148.     because 1981 was the year that Dave released the VAX/VMS version of
  149.     IDL. This version, which was written in VAX-11 MACRO and FORTRAN,
  150.     took advantage of the VAX virtual memory and 32-bit address space,
  151.     and was a huge step beyond the PDP-11 version. It used essentially
  152.     the same sort of graphics hardware as the PDP-11.
  153.   
  154.     In 1987, Dave decided that Unix workstations were the direction in
  155.     which IDL should progress, but porting the current VAX IDL to Unix
  156.     didn't make much sense because of its MACRO and FORTRAN implementation.
  157.     I had just finished my Masters degree and was looking for work.
  158.     Dave hired me and together we wrote the current version of IDL for
  159.     Unix on the Sun 3 taking advantage of the re-write to extend and
  160.     improve the language. Since then, we've ported it to many Unix
  161.     machines and moved it back to VMS. RSI has many other employees now,
  162.     but our focus is still the continued development of IDL. Recently,
  163.     IDL was ported to PC class systems running Microsoft Windows.
  164.   {end quote}
  165.   
  166.   
  167. G02.    Where can I contact them?
  168.   
  169.     Their address is:
  170.   
  171.     Research Systems, Inc.
  172.     777 29th Street, Suite 300
  173.     Boulder, CO 80303
  174.     (303) 786-9900      (Voice)
  175.   
  176.     Email:
  177.         info@rsinc.com or support@rsinc.com         # Internet
  178.         ORION::IDL                                  # SPAN
  179.   
  180.   
  181. G03.    How do I get IDL?
  182.   
  183.     RSI's distribution scheme is unique in that all of the binaries and
  184.   IDL you need are available via anonymous ftp.  IDL binaries and code are
  185.   available at these sites: 
  186.   
  187.     gateway.rsinc.com (192.5.156.17)
  188.         pub/idl
  189.     boulder.colorado.edu (128.138.240.1)
  190.         pub/idl
  191.     lumpi.informatik.uni-dortmund.de (129.217.36.140)
  192.         pub/idl
  193.   
  194.   The README file describes which files are needed, how to unpack them, and
  195.   how to install them. 
  196.     If you install IDL without a valid license, you will get IDL's 7
  197.   minute demo mode.  This mode is designed for users who are considering
  198.   buying the package. 
  199.     To actually get IDL running for good, you must pay for a license
  200.   from RSI and follow their instructions.  You will be asked to fill out a
  201.   form with information unique to your machine.  RSI will create a license
  202.   key which the license manager program (lmgrd) reads to validate your
  203.   license.
  204.     As of release 3.1, upgrades to IDL are no longer free.  For details
  205.   about upgrades and support contracts, contact RSI.
  206.   
  207.   
  208. G04.    What is the current version of IDL?
  209.   
  210.     IDL 3.1.0 is the current version.  It was released June 6, 1993.
  211.   There is no word about when future releases are expected.
  212.   
  213.   
  214. G05.    On what systems does IDL run?
  215.   
  216.     The information below is from the file RELEASE_LEVEL located at
  217.   rsinc.com:/pub/idl/RELEASE_LEVEL.  Ths information applies to release
  218.   3.1.  
  219.   
  220.   {begin quote}
  221.   This release supports the following systems:
  222.   
  223.     - Convex C2 and C3: ConvexOS 10.0.5.
  224.     - Data General Aviion: DG/UX 5.4.1 and later
  225.     - DEC ALPHA: OSF1 1.2.
  226.     - DOS based personal computers running Microsoft Windows 3.1 or later
  227.     - HP 9000: HP-UX 8.0 on Series 300, 400 and 700.
  228.     - IBM 6000: AIX 3.2.
  229.     - MIPS: Risc/OS 4.52B.
  230.     - Risc Ultrix: Ultrix 4.2.
  231.     - SGI: IRIX 4.0
  232.     - Sun 3: SunOS 4.1.1. Widgets are built using OpenWindows 2.0.
  233.     - Sun 4 (sparc):
  234.           [SunOS 4.1.0] Widgets are built using OpenWindows 3.0.
  235.           [SunOS 5.1 (Solaris 2.1)] Widgets are built using
  236.              OpenWindows 3.1.
  237.     - VMS:
  238.           [ALPHA] OpenVMS AXP 1.0.
  239.           [VAX] VMS 5.1 and up. Standard X windows graphics are
  240.         supported at all VMS versions. IDLwidgets are supported
  241.             at VMS 5.4-3 at up *if* the host system has the
  242.         DECWINDOWS-MOTIF package installed.
  243.   
  244.   
  245.   The following hardware/operating system combinations are no longer
  246.   supported. The last release of these versions have been archived, and no
  247.   future development for them will be done:
  248.   
  249.     - Sun 3 running SunOS 3.5 (last release: 2.0.4).
  250.     - Sun 386i running SunOS 4.0.1 (last release: 2.0.4).
  251.     - Sun 3 and Sun 4 running SunOS 4.0 (last release: 2.2.1)
  252.     - HP 9000 series 300 and 400 running HP-UX 7.0
  253.       (last release: 2.2.2)
  254.     - VAX Ultrix (last release: 2.2.2)
  255.   {end quote}
  256.   
  257. G06.    What is PV~WAVE and how is it related to IDL?
  258.   
  259.     Around the time that the Unix version of IDL first became available
  260.   (1988), Precision  Visuals Inc. (PVI) entered into an agreement with RSI
  261.   under which they enhanced and resold IDL under the name PV~WAVE. In
  262.   September of 1990, they exercised an option in that agreement that
  263.   resulted in the following:
  264.   
  265.     - They received a copy of the IDL source code as it existed in
  266.   September 1990 in return for a one-time payment to RSI.
  267.   
  268.     - The connection between RSI and PVI was severed.
  269.   
  270.     IDL and PV~WAVE are now on separate development tracks. Each
  271.   company enhances, supports, and maintains its own product.
  272.   
  273.     PVI has since merged with IMSL and is now Visual Numerics, Inc.
  274.   (VNI).
  275.   
  276.   
  277. G07.    Are there anonymous FTP sites for IDL?
  278.   
  279.   The sites below contain public domain IDL code.
  280.   
  281.     JHU/APL IDL library
  282.     fermi.jhuapl.edu [128.244.147.14]
  283.         /pub/idl-pvwave/jhuapl
  284.   
  285.     NASA IDL Astronomy User's Library
  286.     idlastro.gsfc.nasa.gov [128.183.57.82]
  287.         /
  288.   
  289.     IUE RDAF library
  290.     iuesn1.gsfc.nasa.gov [128.183.57.16]
  291.     cetus.colorado.edu [128.138.238.151]
  292.         /pub
  293.   
  294.     ICUR Spectral Analysis Software
  295.     ftp.astro.psu.edu [128.118.147.28]
  296.         /pub/nefftp/icur
  297.   
  298.     IDL ROSAT software
  299.     rosserv.gsfc.nasa.gov [128.183.8.43]
  300.         /pub/IDL
  301.   
  302.     IDLmeteo library
  303.     ftp.sma.ch (141.249.3.33)
  304.         /pub/idlmeteo
  305.   
  306. G08.    How can I get help?
  307.   
  308.     RSI has excellent telephone and email support.  You can contact
  309.   them at: 
  310.   
  311.     (303) 786-9900      (Voice)
  312.     (303) 786-9909      (Fax)
  313.   
  314.         Email:
  315.         info@rsinc.com or support@rsinc.com         # Internet
  316.         ORION::IDL                                  # SPAN
  317.   
  318.   Keep in mind, however, that their phone support is for their paying
  319.   customers.
  320.   
  321.   
  322. G09.    Why are there two newsgroups for IDL?
  323.   
  324.     Unfortunately, there are two very different packages with the
  325.   abbreviation "IDL".  The newsgroup comp.lang.idl is for the Interface
  326.   Description Language.  The newsgroup for discussing issues related to
  327.   RSI's IDL and VNI's PV~WAVE and IMSL/IDL is comp.lang.idl-pvwave.
  328.   
  329.   
  330. G10.    Does anyone at RSI read this group?  Is anyone there listening?
  331.   
  332.     [ This question was included at the request of RSI.  The answer was
  333.       provided by Ali Bahrami. -pat ]
  334.   
  335.     {begin quote}
  336.     Yes, many of us do. We're naturally curious what people think of
  337.     our product. We make notes about what people like and dislike and
  338.     this influences our decisions.
  339.   
  340.         However, you usually won't get a direct response from us from
  341.         a posting to this group. There are many reasons for this.
  342.         Here are a couple of the more important ones:
  343.   
  344.           [] We believe that this group should belong solely to the
  345.              user community, and should be free of vendor bias and
  346.              marketing. It should be noted that both RSI and Visual
  347.              Numerics (formerly PVI) have shown great restraint in this
  348.              matter, and that this group is largely left to the actual
  349.              users. (Long term readers will recall some notable exceptions
  350.              to this, but in general it is true.)
  351.   
  352.              It could be argued that as long as the topic stays
  353.              technical, vendor postings are OK. The problem with this
  354.              is that one persons technical posting is another's
  355.              blatant product plug, and the line between them is not
  356.              always obvious.
  357.   
  358.            [] We provide support for our customers via the phone and email.
  359.              If you would like an answer from us, you should
  360.              call us directly. We have no objection to you sharing the
  361.              information you get in this manner with the newsgroup as
  362.              long as you quote us accurately and separate fact from
  363.              conjecture.
  364.   
  365.         In other words, you should view this newsgroup as a way to share
  366.         questions and information with other users, not as a way to
  367.         contact the vendor.
  368.     {end quote}
  369.   
  370. G11.    When is the next version of IDL due out?
  371.   
  372.     IDL 3.1 was release in June, 1993.  There is no word as to when the
  373.   next release is expected
  374.   
  375.   
  376. ============================================================
  377. TECHNICAL QUESTIONS:
  378.   
  379. Note for Sun users:
  380.   
  381. There is a mini FAQ for Sun IDL in $IDL_DIR/notes, and the following
  382. questions are answered in the file openwin3.doc:
  383. (1) IDL complains about missing fonts when creating widgets.
  384. (2) IDL complains about missing bitmap files when creating widgets.
  385. (3) How to make IDL work with OpenWindows version 3.0.
  386. (4) 3-D appearance for OpenLook IDLwidgets.
  387. (5) Why does one of the widgets appear red?
  388. (6) Why does pressing the left button while pointing at a pulldown menu
  389. button cause the menu to pop up with the pushpin in?  Older versions of IDL
  390. didn't to that.
  391. (7) The font used by the list widget is much larger than it used to be, and
  392. I don't like the result on my program.
  393. (8) Why do I get "Cannot allocate colormap entry" errors, and why do they
  394. kill IDL?
  395. (9) I've changed my .Xdefaults file, but nothing different happened. Why?
  396.   
  397.   
  398. T01.    Why doesn't polycontour fill open contours?
  399.   
  400.     This problem is described in the POLYCONTOUR manual page.
  401.   
  402.   {begin quote}
  403.   RESTRICTIONS:
  404.     This routine will NOT draw open contours.  To eliminate open
  405.     contours in your dataset, surround the original array with a 1-element
  406.     border on all sides.  The border should be set to a value less than
  407.     or equal to the minimum data array value.
  408.   
  409.     For example, if A is an (N,M) array enter:
  410.   
  411.         B = REPLICATE(MIN(A), N+2, M+2)    ;Make background
  412.         B(1,1) = A            ;Insert original data
  413.         CONTOUR, B, PATH=Filename ...    ;Create the contour file.
  414.   {end quote}
  415.   
  416.   [ This problem was fixed in IDL 3.1. ]  
  417.   
  418. T02.    How do I increase the number of commands stored in the
  419. history buffer?
  420.   
  421.     The system variable !EDIT_INPUT controls command recall.  By
  422.   default, it is set to 1, causing the last 20 commands to be saved.  If it
  423.   is 0, no commands are saved.  To save more than 20 commands, just put
  424.   !EDIT_INPUT=50 (or other large number) in your startup file. 
  425.   
  426.     It is important to realize that IDL looks at the value of
  427.   !EDIT_INPUT the first time it reads anything from the keyboard, and the
  428.   size of the history buffer is fixed after that. Hence, the command must
  429.   be in a startup file because entering it at the keyboard is too late.
  430.   
  431.   
  432. T03.    How do I get IDL to call routines in language X, running
  433. under system Y?
  434.   
  435.     Jeff Valenti has written a sizable document about calling external
  436.   FORTRAN routines from IDL.  You can find it at
  437.   jaameri.gsfc.nasa.gov:/pub/idl/idl-fortran.
  438.   
  439.   
  440. T04.    Why does XPALETTE edit my color table incorrectly?
  441.   
  442.     Here is the answer from RSI support:
  443.   
  444.   {begin quote}
  445.   The color applications such as xpalette and xloadct use a common block
  446.   called "colors" to keep track of the color vectors.  When you call tvlct,
  447.   your vectors are loaded into the colormap, but they are not put into the
  448.   colors common block. 
  449.   
  450.   When xpalette starts, it checks to see if the colors have been defined in
  451.   the common block and uses them if they have.  Otherwise it sets them to
  452.   the standard black and white colormap, in which r,g,b are each linear
  453.   ramps. (The colors are as you expect because there is only one colormap.)
  454.   
  455.   Admittedly, this is not the most desirable situation.  You would like
  456.   your colors which you loaded with TVLCT to be recognized by xpalette.  We
  457.   modified xpalette (and xloadct) to use the current colormap when they
  458.   start up by getting the current vectors with TVLCT. 
  459.   
  460.   Another alternative would be to use the following lines to define the
  461.   common block prior to calling your current version of xpalette. 
  462.   
  463.   [ assume here that you have a routine called "restore" which reads colors
  464.     from a file somewhere and creates vectors r, g, and b.  -pat ]
  465.   
  466.   IDL> restore, file='ryan.sav', r, g, b   ;get the vectors from somewhere
  467.   IDL> tvlct, r, g, b
  468.   IDL> common colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr
  469.   IDL> r_orig = r & r_curr = r
  470.   IDL> g_orig = g & g_curr = g
  471.   IDL> b_orig = b & b_curr = b
  472.   IDL> xpalette
  473.   
  474.   {end quote}
  475.   
  476. T05.    Is there on-line help for IDL?
  477.   
  478.     Try ?.
  479.   
  480. T06.    I run IDL under X in SunOS 4.x, and after I logout, the screen
  481. becomes completely blank.  Typing in login names and passwords 'blindly'
  482. logs you in again with the 'correct' colors.  How to prevent this?
  483.   
  484.   [Note: This is only a problem under OpenWindows2. -pat ]
  485.   
  486.     Add the following to your .Xdefaults:
  487.   
  488.   Idl*colors:    -5
  489.   
  490.   which reserves some colors for the colormap so that IDL does not exhaust
  491.   all the available colors.  (For a nice summary of Sun IDL interactions
  492.   with OpenWindows, see $IDL_DIR/notes/openwin3.doc)
  493.   
  494.     Another solution is to put a call to clear_colormap in your .login
  495.   file to be executed after OpenWindows start up.
  496.   
  497.   
  498. T07.    Sometimes my variables seem to disappear.  Why is this?
  499.   
  500.   Quoting the IDL User's Guide, page 10-8:
  501.   
  502.   {begin quote}
  503.   IDL users may find that all their variables have seemingly disappeared
  504.   after an error occurs inside a procedure or function.  The misunderstood
  505.   subtlety is that after the error occurs, IDL's context is inside the called
  506.   procedure, not in the main level.  Typing RETALL or RETURN will make the
  507.   lost variables reappear.
  508.   
  509.   RETALL is best suited for use when an error is detected in a procedure and
  510.   it is desired to return immediately to the main program level despite
  511.   nested procedure calls.  RETALL issues RETURN commands until the main
  512.   program level is reached.
  513.   
  514.   The HELP command can be used to see the current call stack (i.e., which
  515.   program unit IDL is in and which program unit called it).
  516.   {end quote}
  517.   
  518.   
  519. T08.    Is there a major mode for editing IDL code in Emacs?
  520.   
  521.     No and yes.
  522.     VNI has developed a PV~WAVE major mode, which they have made
  523.   available under the FSF copyleft.  Given the (remaining) strong similarity
  524.   between PV~WAVE and IDL, it has many of the features that one would like
  525.   in such a mode.
  526.       It is available by anonymous ftp from ftp.pvi.com (128.138.213.22) in
  527.   the ./PVI/emacs directory
  528.   
  529.   [ wave-mode.el seems to work pretty well.  Be warned, however, that it is
  530.     a memory hog and it will do a lot of garbage-collection. -pat ]
  531.   
  532.   
  533. T09.    How do I get 3-D widgets under OpenLook 3.0?
  534.   
  535.    This subject is discussed on page 53 of the OpenWindows Version 3
  536.    User's Guide Release Manual.
  537.   
  538.    OpenWindows 3.0 added 3-D appearance for widgets. In order for
  539.    the 3-D look to work, it must be enabled and the background color
  540.    must be a medium tone color such as "grey" or "wheat".
  541.    Add the following resources to your ~/.Xdefaults file:
  542.   
  543.     For plain IDL:
  544.   
  545.         Idl*threeD:     TRUE
  546.         Idl*background: PeachPuff2
  547.   
  548.     For IMSL/IDL:
  549.         Imslidl*threeD:     TRUE
  550.         Imslidl*background: PeachPuff2
  551.   
  552. T10.    Why does one of the widgets appear red under OpenWindows?
  553.   
  554.    This subject is discussed on page 53 of the OpenWindows Version 3
  555.    User's Guide Release Manual.
  556.   
  557.    The OLIT widget toolkit, which is used by IDL, added the
  558.    concept of "mouseless focus" under version 3.0. The red widget
  559.    indicates where the current mouseless focus is. Use the arrow keys
  560.    to traverse the widgets, and the spacebar to make a selection.
  561.   
  562. T11.    Where are all the IDL routines and userlib procedures?
  563.   
  564.   The basic routines are not accessible, for obvious reasons.  The userlib,
  565.   statlib and widget procedures are in $IDL_DIR/lib/.  The procedure XDL also
  566.   displays the full pathname.  The system variable !path also contains the
  567.   directory names for all accessible IDL procedures.
  568.   
  569. T12.    Does anybody know how to put multiple image plots on one page in
  570. PostScript?
  571.   
  572.   Because PostScript has scalable pixels, you must specify the xsize and
  573.   ysize parameters, as well as the position parameter, in TV or TVSCL.
  574.   I don't know about PV-Wave, but the following works in IDL:
  575.   
  576.   ; Display four images in a 2x2 grid
  577.   ; Assume data(x,y,4) = array containing the 4 images
  578.   
  579.   set_plot, 'ps'           ;request PostScript output
  580.   device, ...              ;modify page size, orientation, etc. as desired
  581.   ximsize = 0.5*!d.x_size  ;define output image size
  582.   yimsize = 0.5*!d.y_size  ;note: 0.5 assumes 2x2 grid
  583.   for i=0,3 do begin       ;display the 4 images, using i as position index
  584.      tv, data(*,*,i), i, xsize=ximsize, ysize=yimsize
  585.   endfor
  586.   
  587. T13.    Does case matter in IDL?
  588.   
  589.       No.
  590.       Compiled routines are case insensitive.  The only catch is that, on
  591.   Unix systems, when executing a script via the .RUN command, the file name
  592.   argument must exactly match the file name as it appears on the disk.
  593.   Once the routines in the script are compiled, their names can be written
  594.   in any case.  This is not a problem in operating systems such as VMS that
  595.   do not distinguish case for file names.  This is usually not a problem
  596.   under Unix either since, by convention, most people use lower case file
  597.   names.
  598.   
  599.   
  600. T14.    How do I set up IDL to get precise control over plot window
  601. and text positioning with either portrait or landscape page orientation
  602. on a PostScript or HP-GL printer?
  603.   
  604.   
  605.   (This answer only applies to PostScript and HP-GL printers --
  606.   other printers may differ in having the X and Y offsets measured from
  607.   the upper left corner of the portrait page instead of the lower left
  608.   corner.)
  609.   
  610.   IDL uses portrait page orientation as a default.  (The x axis is along
  611.   the shorter dimension of the paper.)  In portrait orientation the lower
  612.   left corner of the page is the origin for the XOFFSET and YOFFSET page
  613.   offsetting keywords of the DEVICE command that determine the origin
  614.   (lower left corner) of the output window.  (Normally one uses XOFFSET=0
  615.   and YOFFSET=0 for portrait orientation.)  Size of the output window is
  616.   determined by the XSIZE and YSIZE keywords of the DEVICE command.
  617.   The origin for graph positioning variables !P.POSITION and !P.REGION
  618.   is the output window origin.  X and Y coordinates for portrait page
  619.   orientation are shown on the sketch below as upper case X and Y.
  620.   
  621.   
  622.                 ----------
  623.                 |        |   ORIGINAL PORTRAIT PAGE  (Printer only prints on
  624.               Y |        |         OUTPUT WINDOW                  this area.)
  625.                 |        |
  626.                 |   X    |
  627.                 o-----------
  628.                 |    y   + |   OUTPUT WINDOW ROTATED ABOUT LOWER LEFT CORNER
  629.               x |        + |
  630.                 |        + |
  631.                 ------------
  632.                 ++++++++++    OUTPUT WINDOW RESIZED FOR LANDSCAPE ORIENTATION
  633.                      ^
  634.                      |    DIRECTION OF NEEDED OFFSET
  635.   
  636.   
  637.   If device,/landscape is specified, then the output window is rotated
  638.   90 deg. clockwise about the lower left corner of the page.
  639.   In this condition nothing will be plotted on the page, since the
  640.   rotation has carried the output window entirely off the paper as shown
  641.   in the sketch above.  To correct this mismatch, the rotated output window
  642.   must be offset.  XOFFSET AND YOFFSET are still measured in the X and Y
  643.   coordinates of the portrait page, but now represent the position of the
  644.   lower left corner of the rotated (and resized) output window (marked by
  645.   an o above) with respect to the lower left corner of the portrait (actual)
  646.   page.  Hence, one generally uses XOFFSET=0 and
  647.   YOFFSET=long_dimension_of_page for landscape orientation.
  648.   
  649.   In landscape orientation, the coordinates for graph positioning variables
  650.   !P.POSITION and !P.REGION are the lower case x and y coordinates
  651.   shown in the sketch above and having origin marked by the letter o.
  652.   Position of output window origin o on the page is, of course, affected
  653.   by the setting of XOFFSET and YOFFSET, as explained before.  The XSIZE
  654.   and YSIZE (output window size) keywords of the DEVICE command are also
  655.   measured in the x and y directions when in landscape orientation.  The
  656.   resizing of the landscape page generally means interchanging the values
  657.   of XSIZE and YSIZE appropriate for the portrait page.
  658.   
  659.   
  660.   Example of settings for a portrait page:
  661.   
  662.   XPAGE=8.5  &  YPAGE=11.  &  XOFFS=0.  &  YOFFS=0.  ;Inches
  663.   DEVICE,/INCHES,XSIZE=XPAGE,YSIZE=YPAGE,XOFFSET=XOFFS,YOFFSET=YOFFS
  664.   
  665.   Example of settings for a landscape page:
  666.   
  667.   XPAGE=11.  &  YPAGE=8.5  &  XOFFS=0.  &  YOFFS=XPAGE  ;Inches
  668.   DEVICE,/LANDSCAPE,/INCHES,XSIZE=XPAGE,YSIZE=YPAGE,XOFFSET=XOFFS, $
  669.        YOFFSET=YOFFS
  670.   
  671.   Example of setting position and size of a plot window:
  672.   
  673.   X0=1.374  &  Y0=1.283  &  XLEN=3.622  &  YLEN=6.157  ;Inches
  674.   !P.POSITION=[X0/XPAGE,Y0/YPAGE,(X0+XLEN)/XPAGE,(Y0+YLEN)/YPAGE]
  675.   
  676.   Example of setting position and orientation of a text string:
  677.   
  678.   x0=.35  &  y0=.37  ;Inches
  679.   xyouts,x0/xpage,y0/ypage,!stime,orient=90,/normal     ;Date, time
  680.   
  681.   
  682. T15.     I get the error message "Code Area Full".  What do I do?
  683.   
  684.   IDL sets aside a certain amount of memory area for compiling programs.  The
  685.   current code and area sizes can be seen with the HELP command, e.g.
  686.   
  687.         IDL> help
  688.         % At $MAIN$  .
  689.         Code area used: 0% (0/16384),  Symbol area used: 0% (2/4096)
  690.   
  691.   These sizes can be increased with the .SIZE command.  Quoting the IDL User's
  692.   Manual, page 2-11:
  693.   
  694.   {begin quote}
  695.   These sizes represent a compromise between an unlimited program space and
  696.   conservation of memory.  User procedures and functions are compiled in this
  697.   large program area.  After successful compilation, a new memory are of the
  698.   required size is allocated to contain the newly compiled program unit.
  699.   
  700.   Resizing the code and data areas erases the currently compiled main program
  701.   and all mail program variables.  For example, to extend the code and data
  702.   areas to 30000 and 5000 bytes respectively:
  703.   
  704.                         .SIZE 30000 5000
  705.   {end quote}
  706.   
  707.   Getting "Code Area Full" is often an indication that the routine is
  708.   large, and would benefit by decomposition into sub-procedures/functions.
  709.   It's better to avoid use of .SIZE because your code will always work on
  710.   other systems where the users don't use a large .SIZE setting.
  711.   
  712.   
  713. T16.    Sometimes I get the following error message:
  714.  
  715. % Unable to allocate memory: to make array.
  716.  not enough core
  717.   
  718.   RSI support replies:
  719.   
  720.   {begin quote}
  721.   The circumstances described happen when memory becomes fragmented.
  722.   Unfortunately, there is nothing you can do except use less memory in your
  723.   application, or get more for the system to work with. 
  724.   {end quote}
  725.   
  726.   
  727. ============================================================
  728.   
  729.   Disclaimer:
  730.   
  731.   I do not work for RSI and I am in no way answerable to them.  Questions and
  732.   answers in this document are culled from the user community.  No warranty,
  733.   express or implied exists regarding this document.  Permission to copy all
  734.   or part of this work is granted, provided that the copies are not made or
  735.   distributed for resale.
  736.   
  737. This file can always be found at jaameri.gsfc.nasa.gov [128.183.88.75]
  738. in pub/idl/idl-faq.  A URL entry for this file would look like:
  739.  
  740. file://jaameri.gsfc.nasa.gov/pub/idl/idl-faq
  741.   
  742.   Additions and corrections should be sent to:
  743.   
  744.       idl-faq@jaameri.gsfc.nasa.gov
  745.   
  746.   -----
  747.     Many thanks to the following for their contributions.
  748.   
  749.     black@breeze.rsre.mod.uk (John Black)
  750.     claflin@claes.space.lockheed.com (Scott Claflin)
  751.     edelsohn@npac.syr.edu (David Edelsohn)
  752.     fireman@iuegtc.DNET.NASA.GOV (Gwyn Fireman)
  753.     gurman@umbra.gsfc.nasa.gov (Joseph B. Gurman)
  754.     jdlb@kukui.IFA.Hawaii.Edu (JF Pitot de La Beaujardiere)
  755.     kashyap@oddjob.uchicago.edu (Vinay Kashyap)
  756.     mayor@vaxine.larc.nasa.gov (Shane Mayor)
  757.     oet@maz.sma.ch (Thomas Oettli)
  758.     rmmoss@Texaco.COM (Robert M. Moss)
  759.     sterne@dublin.llnl.gov (Philip Sterne)
  760.     thompson@serts.gsfc.nasa.gov (William Thompson)
  761.     valenti@soleil.Berkeley.EDU (Jeff Valenti)
  762.   
  763.   
  764.   --
  765.                                                              patrick m. ryan
  766.      nasa / goddard space flight center / oceans and ice branch / hughes stx
  767.                pat@jaameri.gsfc.nasa.gov / patrick.m.ryan@x500.gsfc.nasa.gov
  768.  
  769.